Context - Oriented Programming
نویسنده
چکیده
Context-oriented programming (COP) introduces one more notion to reason about the structure of software systems: a context (an environment) is a set of entities bound with a system of relations. This view is applicable where the object-oriented one is inadequate. Implementation of COP requires the same techniques as OOP: COP and OOP are different things assembled from the same components. COP allows things that OOP cannot do, for example, COP enables us to use late binding for elementary data that are not OOP objects. 1. The purpose of the work The key element of software activities (like designing, writing, debugging, reading and modifying programs) is reasoning. We do not give a definition for reasoning, but we assume that the use of a small number of adequate concepts facilitates reasoning—that is, if the concepts in use are adequate and expressive, if no auxiliary concepts are required, it is easier to reason about programs. The purpose of this work is to extend the set of notions, which may be used to reason about the problem to be solved and the structure of the corresponding software system. Along with the notion of a context, an approach to problem decomposition, and a programming technique appear. 2. The method of COP 2.1. Quick introduction An environment (a context) expresses the idea of a system of relations (where "relation" is used in its everyday meaning, a connexion between things). The phrase "system of relations" implies that there are some entities, upon which relations are established. The key point in COP is that to use the relations, we do not need to know details about the entities. This is good, but how can we use the relations? In principle, different approaches are possible. The simplest way is to implement a set of functions, which imply that the data elements to be processed are bound with these relations. (Indeed, using these functions, we use knowledge of that the data elements are related, otherwise it would be incorect to use the functions). The next step is to introduce polymorphism. This may be done via tables of pointers to functions, that is, virtual method tables (VMT, where "method" is understood as "member function"). Contexts are implemented as VMT's, and these VMT's are not bound to data. So, from the implementation point of view, there are interchangeable sets of functions, allowing us to work with different (but somehow similar) sets of …
منابع مشابه
Demand-oriented timetable design for urban rail transit under stochastic demand
In the context of public transportation system, improving the service quality and robustness through minimizing the average passengers waiting time is a real challenge. This study provides robust stochastic programming models for train timetabling problem in urban rail transit systems. The objective is minimization of the weighted summation of the expected cost of passenger waiting time, its va...
متن کاملCONTEXT- ORIENTED ARCHITECTURAL CONSIDERATIONS IN CHAHAR BAGH ABBASI STREET IN ESFAHAN
The view at the apparent composition of the streets of a city is the first visual perception of each person from that city. Charbagh Abbasi Street is a valuable centerpiece in identity of Isfahan as a historical city. Over time, due to body wear and erosion and unplanned renovations, some significant changes have been made in the physical form of this axis, and the identity aspects of the Chaha...
متن کاملA Context-Oriented Extension of F#
Context-Oriented programming languages provide us with primitive constructs to adapt program behaviour depending on the evolution of their operational environment, namely the context. In previous work we proposed MLCoDa, a context-oriented language with two-components: a declarative constituent for programming the context and a functional one for computing. This paper describes the implementati...
متن کاملContext Aware Service Oriented Computing in Mobile Ad Hoc Networks Context Aware Service Oriented Computing in Mobile Ad Hoc Networks Abstract Context Aware Service Oriented Computing in Mobile Ad Hoc Networks
CONTEXT AWARE SERVICE ORIENTED COMPUTING IN MOBILE AD HOC NETWORKS
متن کاملExplicit Language and Infrastructure Support for Context-aware Services
Dealing with context information is an important concern for mobile service computing. However, modern frameworks and programming languages do not directly support context-dependent behavior with first class entities. In this paper, we present Context-oriented Programming for mobile applications and provide an overview of our context-oriented extension to the Java programming language.
متن کاملAspect-oriented Programming versus Reeection: a Rst Draft
Reeection has a long history of dealing about some aspects of software components. In this short position paper, we compare and contrast reeection and aspect-oriented programming. Whilst reeection has recently focused on very speciic aspects of software components, namely implemen-tational usually segregated among structural (representation) and behavioral (execution) aspects, aspect-oriented p...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998